package com.ss.android.article.common.model;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import java.util.List;

public class Comment implements Parcelable {
    public static final Parcelable.Creator CREATOR;
    public boolean isCanDelete;
    public boolean isDigged;
    public String mContent;
    public long mCreateTime;
    public int mDiggCount;
    public long mId;
    public Comment mReplyComment;
    public User mUser;
    public List mUserPosition;

    static {
        CREATOR = new Creator<Comment>(){

            @Override
            public Comment createFromParcel(Parcel source) {
                return new Comment(source);
            }

            @Override
            public Comment[] newArray(int size) {
                return new Comment[size];
            }
        };
    }

    public Comment() {

    }

    protected Comment(Parcel arg7) {
        boolean v1 = true;

        this.mId = arg7.readLong();
        this.mContent = arg7.readString();
        this.mCreateTime = arg7.readLong();
        this.mDiggCount = arg7.readInt();
        boolean v0 = arg7.readByte() != 0 ? true : false;
        this.isDigged = v0;
        this.mUser = arg7.readParcelable(User.class.getClassLoader());
        this.mReplyComment = arg7.readParcelable(Comment.class.getClassLoader());
        if(arg7.readByte() == 0) {
            v1 = false;
        }

        this.isCanDelete = v1;
        this.mUserPosition = arg7.createTypedArrayList(UserPosition.CREATOR);
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel arg7, int arg8) {
        byte v1 = 1;
        arg7.writeLong(this.mId);
        arg7.writeString(this.mContent);
        arg7.writeLong(this.mCreateTime);
        arg7.writeInt(this.mDiggCount);
        byte v0 = (byte) (this.isDigged ? 1 : 0);
        arg7.writeByte(v0);
        arg7.writeParcelable(this.mUser, arg8);
        arg7.writeParcelable(this.mReplyComment, arg8);
        if(!this.isCanDelete) {
            v1 = 0;
        }

        arg7.writeByte(v1);
        arg7.writeTypedList(this.mUserPosition);
    }
}

